package me.yobol.lintcode.naive.countlinkedlist;

import me.yobol.lintcode.LinkedListUtils;
import me.yobol.lintcode.ListNode;

/**
 *
 * @author Yobol
 */
public class Main {
    public static void main(String[] args) {
        ListNode root = new ListNode(1);
        ListNode node2 = new ListNode(2);
        root.next = node2;
        ListNode node3 = new ListNode(3);
        node2.next = node3;
        ListNode node4 = new ListNode(4);
        node3.next = node4;
        LinkedListUtils.print(root);
        ICountLinkedListNodes clln = new CountLinkedList();
        assert(clln.countNodes(root) == 4);
    }
}
